import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 输出一个整数的每一位
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-16  21:40
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int count = 0;
        int number = scanner.nextInt();
        int tmp = number;
        while(tmp != 0){
            count++;
            tmp /= 10;
        }
        System.out.println(count);
        for (int i = 0; i < count; i++) {
            System.out.println(number % 10);
            number /= 10;
        }
    }
}
